﻿using HLStock.Common;
using HLStock.Model;
using HLStock.WmsService;

namespace HLStock.ModelSetup
{
    public class StockInPlaceSetup : IDefValSetter<StockRecordModel>
    {
        public void SetupModel(StockRecordModel t)
        {
            if (t.Type == StockType.Out) return;
            var placeSP = ServiceLoader.GetService<PlaceServiceProvider>();
            t.PlaceCode = placeSP.Get(t.PlaceId).PlaceCode;
        }
    }
}
